﻿using Swashbuckle.AspNetCore.SwaggerUI;

namespace Luka;

/// <summary>
/// swaagger文档选项
/// </summary>
[NotScanned]
public sealed class SwaggerOptions
{
    /// <summary>
    /// 是否弃用
    /// </summary>
    public bool IsEnable { get; set; } = true;

    /// <summary>
    /// 是否同类名:true
    /// </summary>
    public bool IsÄhnlicheName { get; set; }

    /// <summary>
    /// 是否根据方法名排序:true
    /// </summary>
    public bool IsOrderActions { get; set; }

    /// <summary>
    /// 是否忽略废弃属性：false
    /// </summary>
    public bool IgnoreObsoleteProperties { get; set; }

    /// <summary>
    /// 是否忽略废弃方法：false
    /// </summary>
    public bool IgnoreObsoleteActions { get; set; }

    /// <summary>
    /// xml名称
    /// </summary>
    public string[]? XmlName { get; set; }

    /// <summary>
    /// 启用鉴权
    /// </summary>
    public bool EnableAuth { get; set; }

    /// <summary>
    /// 列表样式：List
    /// </summary>
    public DocExpansion Expansion { get; set; }

    /// <summary>
    /// 接口访问的域名
    /// </summary>
    public List<OpenApi>? OpenApis { get; set; }
}

/// <summary>
/// 接口访问的域名
/// </summary>
[NotScanned]
public sealed class OpenApi
{
    /// <summary>
    /// Url
    /// </summary>
    public string? Url { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 是否启用
    /// </summary>
    public bool IsEnable { get; set; } = true;
}